//
//  StageViewController.m
//  bluetoothLamp
//
//  Created by sunx on 14/12/12.
//  Copyright (c) 2014年 sunx. All rights reserved.
//

#import "StageViewController.h"
#import "ViewController.h"

@interface StageViewController ()
{
    ViewController *viewController;
    UIColor *black;
    UIColor *gray;
}
@property (strong, nonatomic) IBOutlet UIView *colorLabel;
@end

@implementation StageViewController
@synthesize toggleViewBaseChange;

- (void)viewDidLoad {
    viewController = (ViewController*)[[self parentViewController] presentingViewController];
    [self.colorLabel setBackgroundColor:[UIColor clearColor]];
    black = [UIColor colorWithRed:0.121 green:0.121 blue:0.121 alpha:1.0];
    gray =[UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0];
    [_button_1 setBackgroundColor:black];
    [_button_2 setBackgroundColor:black];
    [_button_3 setBackgroundColor:black];
    [_button_4 setBackgroundColor:black];
    
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)selectLeftButton
{
    NSLog(@"LeftButton Selected");
}

- (void)selectRightButton
{
    NSLog(@"RightButton Selected");
}

- (IBAction)model_1:(id)sender {
    
    [viewController model_1];
    [_button_1 setBackgroundColor:gray];
    [_button_2 setBackgroundColor:black];
    [_button_3 setBackgroundColor:black];
    [_button_4 setBackgroundColor:black];
}
- (IBAction)model_2:(id)sender {
    [viewController model_2];
    [_button_1 setBackgroundColor:black];
    [_button_2 setBackgroundColor:gray];
    [_button_3 setBackgroundColor:black];
    [_button_4 setBackgroundColor:black];
}
- (IBAction)model_3:(id)sender {
    [viewController model_3];
    [_button_1 setBackgroundColor:black];
    [_button_2 setBackgroundColor:black];
    [_button_3 setBackgroundColor:gray];
    [_button_4 setBackgroundColor:black];

}
- (IBAction)model_4:(id)sender {
    [viewController model_4];
    [_button_1 setBackgroundColor:black];
    [_button_2 setBackgroundColor:black];
    [_button_3 setBackgroundColor:black];
    [_button_4 setBackgroundColor:gray];

}
- (IBAction)choose_null:(id)sender {
    [self.colorLabel setBackgroundColor:[UIColor clearColor]];
    [_button_1 setBackgroundColor:black];
    [_button_2 setBackgroundColor:black];
    [_button_3 setBackgroundColor:black];
    [_button_4 setBackgroundColor:black];
}
- (IBAction)color_1:(id)sender {
    [viewController color_1];
    [self.colorLabel setBackgroundColor:[UIColor redColor]];
}
- (IBAction)color_2:(id)sender {
    [viewController color_2];
    [self.colorLabel setBackgroundColor:[UIColor blueColor]];
}
- (IBAction)color_3:(id)sender {
    [viewController color_3];
    [self.colorLabel setBackgroundColor:[UIColor whiteColor]];
}
- (IBAction)color_4:(id)sender {
    [viewController color_4];
    [self.colorLabel setBackgroundColor:[UIColor greenColor]];
}





- (IBAction)exitToHere:(UIStoryboardSegue *)sender {
}
@end
